import {request} from '@/utils/request'

export async function getVehicles(data){
  return request('api/vehicles','get',data)
}

export async function getVehicle(id){
    return request(`api/vehicles/${id}`,'get')
}

export async function delVehicle(id){
    return request(`api/vehicles/${id}`,'delete')
}

export async function updataVehicle(data){
    return request(`api/vehicles/${data.id}`,'put',data)
}

export async function addVehicle(data){
    return request('api/vehicles','post',data)
  }

export default {
    getVehicles,
    updataVehicle,
    delVehicle,
    addVehicle,
    getVehicle
}
